function createMenuProfile() {
    $('<div/>', {id: "profile"}).appendTo('#menu');
    if (!OurGame.UID) {
        $('#profile').text('You are not logged in!');
        return;
    }
    $('<div/>', {id: "profile-picture-container"}).appendTo('#profile');
    if (!OurGame.playerName){
        getFacebookNameById(
            OurGame.UID,
            function(name) {
                document.getElementById("profile-picture-container").innerHTML = OurGame.playerName;
            }
        );
    } else{
        document.getElementById("profile-picture-container").innerHTML = OurGame.playerName;
    }
    $('<img/>', {src: getFBPictureUrlById(OurGame.UID)}).appendTo('#profile');
}

function profile() {
    createMenuProfile();
}